# 定义变量
rows = 0
j = i = k = h = 1


# 输入行数
def getRow():
    row = 3
    while True:
        try:
            row = int(input('请输入行数: '))
            return row
        except:
            input('请输入正确数字！')


# 选择

"""
* * *
* *
*
"""


# 等腰三角形
def isTriangle():
    rows = getRow()
    for i in range(0, rows):
        for j in range(0, rows - i):
            print('* ', end='')
            j += 1
        i += 1
        print('')


def isTriangle2():
    print("等腰三角形")
    rows = getRow()
    for i in range(0, rows):
        for k in range(0, rows - i):
            print(' * ', end='')
            k += 1
        i += 1
        print('\n')


"""
  *      2，1*1
 ***     1，3*2
*****    0，5*3
"""


def sTriangle():
    print('实心三角形')
    rows = getRow()
    choose = int(input('实心输入1，空心上输入2：'))
    for i in range(0, rows):
        # 空格
        for j in range(1, rows - i):
            print(' ', end='')
            j += 1
            # *
        for k in range(0, i * 2 + 1):
            if choose == 1:
                # 实心
                print('*', end='')
            else:
                # 空心
                if k in (0, i * 2):
                    print('*', end='')
                else:
                    if i < rows - 1:
                        print(' ', end='')
                    else:
                        print('*', end='')
            k += 1
        print('')
        i += 1

#while循环
def get_while():
    sum = 0
    i = 0
    while i < 100:
        sum = sum + i
        i = i + 1
    print("和为：",sum,"额")

#comtinue ,break
def get_continue():
    i=0
    while i<10:
        i += 1
        if i==5:
            continue
        print(i,end = '\t')
def get_break():
    i=0
    while i<10:
        i += 1
        if i==5:
            break
        print(i,end ='\t')

if __name__ == '__main__':
    # isTriangle2()
    # sTriangle()
    # get_while()
    # get_continue()
    # get_break()
    print("我的名字叫%s,我今年%d岁" % ("steven", 20))
